/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: GodK
 * Date: 2024-03-24
 * Time: 14:04
 */
import java.util.Arrays;
import java.util.Locale;
import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改

public class Main {
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        int count = 0;
        for (int i = 1; i <= 2021; i++) {
            if (check(i)) {
                count++;
            }
        }
        System.out.println(count);
        scan.close();
    }

    public static boolean check(int n) {
        for (int i = 0; i <= Math.sqrt(n); i++) {
            for (int j = 0; j <= Math.sqrt(n); j++) {
                if (i * i + j * j == n) {
                    return true;
                }
            }
        }
        return false;
    }

    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
        int i = 20220514;
        while (true) {
            int n = i;

            StringBuilder sb = new StringBuilder();
            StringBuilder number = new StringBuilder();
            number.append(n);
            while (n / 10 > 0) {
                sb.append(n % 10);
                n = n / 10;
            }
            sb.append(n);
            if (sb.toString().equals(number.toString())) {
                System.out.println(sb.toString());
                break;
            }
            i++;
        }
        scan.close();
    }

    public static void main3() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int max = 0;
        int[][] arr = new int[n + 1][n + 1];
        for (int i = 1; i < arr.length; i++) {
            for (int j = 1; j <= i; j++) {
                arr[i][j] = scan.nextInt();
                arr[i][j] += Math.max(arr[i - 1][j], arr[i - 1][j - 1]);
                max = Math.max(max, arr[i][j]);
            }
        }
        System.out.println(max);
        scan.close();
    }

    public static void main4() {
        Scanner scanner = new Scanner(System.in);
        String str1 = scanner.nextLine();
        String str2 = scanner.nextLine();
        System.out.println(order(str1).equals(order(str2)) ? "YES" : "NO");
    }

    private static String order(String str) {
        char[] chars = str.toCharArray();
        Arrays.sort(chars);
        return new String(chars);
    }

    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine().toLowerCase();
        int[] arr = new int[256];
        for (int i = 0; i < s.length(); i++) {
            arr[s.charAt(i)]++;
            if (2 == arr[s.charAt(i)]) {
                System.out.println("NO");
                System.out.println("YES");
            }
        }
    }

    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        int i = 35133153;
        while (true) {
            int n = i;
            StringBuilder sb = new StringBuilder();
            StringBuilder number = new StringBuilder();
            number.append(n);
            while (n / 10 > 0) {
                sb.append(n % 10);
                n = n / 10;
            }
            sb.append(n);
            if (sb.toString().equals(number.toString())) {
                int k = (int)Math.sqrt(i * 2);
                if (k * (k + 1) / 2 == i) {
                    System.out.println(sb.toString());
                    break;
                }
            }
            i++;
        }
        scan.close();
    }
}